import { Component, OnInit,Input } from '@angular/core';
import {
  FormBuilder,
  FormControl,
  FormGroup,
  Validators
} from '@angular/forms';
import { interval } from 'rxjs';

@Component({
  selector: 'app-search',
  templateUrl: './search.component.html',
  styleUrls: ['./search.component.scss'],
})
export class SearchComponent implements OnInit {
 validateForm: FormGroup;
  controlArray = [];
  isCollapse = true;
  now = new Date();
  time = null;
  constructor(private fb: FormBuilder) { }

  ngOnInit() {
 this.validateForm = this.fb.group({
 	 phoneNumberPrefix: [ '' ],
   productName:'',
   productPrice:''
 });
 	// this.time = setInterval(this.changeTime,1010);
const secondsCounter = interval(1000);
secondsCounter.subscribe(() =>
  this.changeTime());
}
ngOnDestroy(){
	// clearInterval(this.time);
}
changeTime(){
	this.now=new Date();
}
resetForm(){

}
}
